import random
bags = [[],[],[]]
balls = ["1","2","3","4","5","6","7","8","9"]
for ball in balls:
    index = random.randint(0,2)
    bags[index].append(ball)
i = 1
for bag in bags:
    if i==1:
      print("红袋子的个数为:%d"%(len(bag)))
    elif i==2:
        print("黄袋子的个数为:%d" % (len(bag)))
    elif i==3:
        print("蓝袋子的个数为:%d" % (len(bag)))
    i += 1
    for ball in bag:
        print("%s"%ball,end="\t")
    print("\n")
    print("-"*20)
print("计科1813 24 姜沭琪")